Version 3.0
User's Guide

Creating Dynamic Pages

Previous | Next
Contents

NetCloak provides new commands that you can incorporate in your HTML pages. NetCloak commands allow you to display information specific to the client or the server at the time the document is being processed, and also allow you to show and hide any individual portion of your document.

While NetCloak commands are not standard HTML tags, they are processed entirely on your Web server, so they work with any Web browser.

Inserting Dynamic Information

Once you have installed NetCloak you may immediately begin to compose HTML documents using NetCloak commands. We strongly recommend that you be completely comfortable writing HTML pages before you start using NetCloak.

If you are not familiar with HTML you can get more information from a variety of sources. In addition to numerous books on HTML, there are many tutorials available on the Web. Once you are familiar with HTML, adding NetCloak features to your pages is easy.

NetCloak's INSERT commands will place dynamic information into your documents supplied by the browser, your server or your users themselves.

For example, to add the current time and date, simply place the commands <INSERT_TIME> and <INSERT_DATE> in the text of your document, as in:

    It is <INSERT_TIME> on <INSERT_DATE>.

To add a page counter, use the <INSERT_COUNT> command:

    This page has been hit <INSERT_COUNT> times.

Most commands that insert information into a page begin with "INSERT", but there are a number of commands such as MACRO and EXEC_CGI which also insert text into a page.

NetCloak can do a lot more than simply inserting text, but the simple INSERT commands are a great way to get started. Once you are feeling comfortable inserting information into your pages, you'll be ready to move on to SHOW and HIDE commands.

Building Conditional Pages

To understand building completely dynamic pages, think of your document as a stream of information being sent through a faucet (your Web server) to the client. NetCloak allows you to turn off (HIDE) and turn on (SHOW) this stream at will.

For example, the following cloaked text:

    This is a <HIDE> trivial <SHOW> test.

Would appear on a web browser as:

    This is a test.

All of the NetCloak "HIDE" commands hide text from the user accessing the page, depending on some variable, essentially turning the stream of text off for that client. "SHOW" commands are used to conditionally turn the stream back on, allowing the user to see the text that follows.

The basic, unconditional HIDE and SHOW commands are very simple, but not very useful by themselves. There are many other NetCloak commands which allow turning the stream off and on conditionally. For example, the HIDE_TIME command will turn the stream off based on the time of day, and the SHOW_RANDOM command will show text based on a random number. These commands are where the real power of NetCloak lies.

To use a conditional command, you must of course specify a condition. The HIDE_TIME command doesn't make sense until you specify a time for something to be hidden. For example:

    <HIDE_TIME BEGINS "10">    This will hide text following the command during the 10 o'clock hour.

Conditional hide and show commands also allow more than one parameter to be specified. For example, to show text to visitors on the weekend, you would use the command:

    <SHOW_DAY BEGINS "Sat" "Sun">

The Commands section of this Guide lists all of the NetCloak commands and explains how each of them works.

Turning off and turning on (hiding and showing) portions of your HTML document is not limited only to text. Hyperlinks which point to other pages, IMG SRC tags etc., can be turned off and turned on as well. All this gives you complete control over how your document looks and behaves in a variety of situations.

General Rules Of NetCloak Syntax

Comparison Operators

Cumulative Effects Of Commands

Using Negative Comparisons

Using Nested INSERT Commands


Copyright © 1996-1999 Maxum Development Corporation

http://www.maxum.com/
Previous | Next
Contents